home *** CD-ROM | disk | FTP | other *** search
Text File | 1996-09-17 | 3.1 KB | 115 lines | [TEXT/MPS ] |
- //========================================================================================
- //
- // File: FWSclNot.h
- // Release Version: $ ODF 2 $
- //
- // Copyright: (c) 1993 - 1996 by Apple Computer, Inc., all rights reserved.
- //
- //========================================================================================
-
- #ifndef FWSCLNOT_H
- #define FWSCLNOT_H
-
- #ifndef FWCONTRL_H
- #include "FWContrl.h"
- #endif
-
- // ----- Foundation Layer -----
-
- #ifndef FWNOTIFN_H
- #include "FWNotifn.h"
- #endif
-
- // ----- OS Layer -----
-
- #ifndef FWFXMATH_H
- #include "FWFxMath.h"
- #endif
-
- #ifndef FWPOINT_H
- #include "FWPoint.h"
- #endif
-
- // ----- OpenDoc Includes -----
-
- #ifndef FWODTYPS_H
- #include "FWODTyps.h"
- #endif
-
- class FW_CScrollBar;
-
- //========================================================================================
- // CLASS FW_CScrollNotification
- //========================================================================================
-
- class FW_CScrollNotification : public FW_CControlNotification
- {
- public:
- FW_DECLARE_CLASS
-
- FW_CScrollNotification(FW_CScrollBar* sb,
- FW_XYSelector direction,
- FW_Fixed delta,
- FW_Boolean shouldScroll = TRUE);
- FW_CScrollNotification(const FW_CScrollNotification& other);
- virtual ~FW_CScrollNotification();
-
- FW_CScrollNotification& operator=(const FW_CScrollNotification& other);
-
- FW_Boolean operator==(const FW_CScrollNotification& other) const;
- FW_Boolean operator!=(const FW_CScrollNotification& other) const;
-
- // ----- Attributes
-
- FW_XYSelector GetDirection(Environment* ev) const;
- FW_Fixed GetDelta(Environment* ev) const;
- FW_Fixed GetScrollPos(Environment* ev) const;
-
- // ----- Internal use
- FW_Boolean ShouldScroll(Environment* ev) const;
-
- private:
- FW_XYSelector fDirection;
- FW_Fixed fDelta;
- FW_Boolean fShouldScroll;
- };
-
- //----------------------------------------------------------------------------------------
- // FW_CScrollNotification::GetDirection
- //----------------------------------------------------------------------------------------
-
- inline FW_XYSelector FW_CScrollNotification::GetDirection(Environment*) const
- {
- return fDirection;
- }
-
- //----------------------------------------------------------------------------------------
- // FW_CScrollNotification::GetDelta
- //----------------------------------------------------------------------------------------
-
- inline FW_Fixed FW_CScrollNotification::GetDelta(Environment*) const
- {
- return fDelta;
- }
-
- //----------------------------------------------------------------------------------------
- // FW_CScrollNotification::ShouldScroll
- //----------------------------------------------------------------------------------------
-
- inline FW_Boolean FW_CScrollNotification::ShouldScroll(Environment*) const
- {
- return fShouldScroll;
- }
-
- //----------------------------------------------------------------------------------------
- // FW_CScrollNotification::operator!=
- //----------------------------------------------------------------------------------------
-
- inline FW_Boolean FW_CScrollNotification::operator!=(const FW_CScrollNotification& other) const
- {
- return !(*this == other);
- }
-
-
- #endif
-